Promise.resolve2=function(value){
    if(value instanceof Promise){
        return value//本身就是实例
    }
    return new Promise((resolve,reject)=>{
        resolve(value)
    })
}
const p=new Promise((resolve,reject)=>{
    resolve(1)
    // reject('error2')
}) 
Promise.resolve2(5).then(res=>console.log('res:',res))